from PySide6 import QtWidgets, QtCore, QtGui


def style_command_link_button(button: QtWidgets.QCommandLinkButton):
	# 设置按钮的QSS样式
	button.setStyleSheet("""
        QCommandLinkButton {
            color: blue;
            padding: 10px;
            border-radius: 5px;
            background-color: #f0f0f0;
        }
        QCommandLinkButton:hover {
            background-color: #ddd;
            color: #0000ff;
        }
        QCommandLinkButton:pressed {
            background-color: #bbb;
        }
    """)


if __name__ == "__main__":
	app = QtWidgets.QApplication([])

	# 创建一个QCommandLinkButton
	button = QtWidgets.QCommandLinkButton("Command Link Button", "Description")

	# 调用函数设置按钮样式
	style_command_link_button(button)

	# 显示按钮
	button.show()

	# 运行应用程序
	app.exec()